﻿using System;
using EasySL.Server.Interface;
using System.Configuration;
using EasySL.Service;

namespace EasySL.Server
{
    public partial class ServerImpl : MarshalByRefObject, IServer
    {
        public ServerImpl()
        {
            Console.WriteLine("New instance Created!");
        }

        public void Initialize()
        {          
            Console.WriteLine("EasySL Server initializing ...");
        }

        public void UnInitialize()
        {
        }

        public override object InitializeLifetimeService()
        {
            return null;
        }

        public string GetData(string requestString)
        {
            Logger.LogInformation(requestString);
            
            var data = DataService.Instance.GetData(requestString);
            return data;
        }

        private static string WorkingDirectory = Environment.CurrentDirectory;
    }
}
